"""
@filename=demo2.py
@version=0.1.0.20230430
@author=amnotgcs
@createTime=20230430 21:25
@lastModifiedTime=20230430 21:34
@description=note
"""


import threading
import time


def first_function():
    print(threading.currentThread().getName(), 'is starting')
    time.sleep(2)
    print(threading.currentThread().getName(), 'is exiting')


def second_function():
    print(threading.currentThread().getName(), 'is starting')
    time.sleep(2)
    print(threading.currentThread().getName(), 'is exiting')


def third_function():
    print(threading.currentThread().getName(), 'is starting')
    time.sleep(2)
    print(threading.currentThread().getName(), 'is exiting')


if __name__ == '__main__':
    t1 = threading.Thread(name='first_f', target=first_function)
    t2 = threading.Thread(name='second_f', target=first_function)
    t3 = threading.Thread(name='third_f', target=first_function)
    t1.start()
    t2.start()
    t3.start()
